package behavioralPattern.state.example01;

import lombok.Data;

/**
 * 上下文类
 */
@Data
public class Context {

    // 维护一个对状态对象的引用
    private State currentState = null;

    public Context() {
    }

    public Context(State currentState) {
        this.currentState = currentState;
    }

    @Override
    public String toString() {
        return "Context{" +
                "currentState=" + currentState +
                '}';
    }
}
